import http from './http';

let userlogin = (params: any): any => http.post('/userlogin', params);

let menulist = (): any => http.get('/menulist', { istree: 1 });
let menuaddedit = (url: any, params: any): any => http.post(url, params);
let menuinfo = (params: any): any => http.get('/menuinfo', params);
let menudelete = (params: any): any => http.post('/menudelete', params);

let rolelist = (): any => http.get('/rolelist');
let roleaddedit = (url: any, params: any): any => http.post(url, params);
let roledelete = (params: any): any => http.post('/roledelete', params);
let roleinfo = (params: any): any => http.get('/roleinfo', params);

let userlist = (params: any): any => http.get('/userlist', params);
let usercount = (): any => http.get('/usercount');
let useraddedit = (url: any, params: any): any => http.post(url, params);
let userinfo = (params: any) => http.get('/userinfo', params);
let userdelete = (params: any) => http.post('/userdelete', params);

export {
    userlogin,
    menulist,
    menuaddedit,
    menuinfo,
    menudelete,

    rolelist,
    roleaddedit,
    roledelete,
    roleinfo,

    userlist,
    usercount,
    useraddedit,
    userinfo,
    userdelete,
}